using System;
using System.Collections.Generic;
using System.Text;
using System.Net;

namespace Stunt.Nutss.Signaling
{

	/// <summary>Client record</summary>
	internal class DirectoryEntry
	{

		#region Variables

		/// <summary>Client'd ID. e.g. user@nutss.net</summary>
		internal NutssUri id;

		/// <summary>Client's IP address and UDP port where the server can send messages.</summary>
		internal IPEndPoint address;

		/// <summary>Time at which the entry expires. By default, 5 minutes after the last refresh message.</summary>
		internal DateTime expires;

		#endregion

		#region Constructor

		/// <summary> Constructs a new client entry.</summary>
		/// <param name="id">Client ID</param>
		/// <param name="address">Client's UDP address and port</param>
		/// <param name="expires">Expiry time</param>
		internal DirectoryEntry(NutssUri id, IPEndPoint address, DateTime expires)
		{
			this.id = id;
			this.address = address;
			this.expires = expires;
		}

		#endregion

	}
}
